//
//  LYQComposeTypeView.swift
//  SwiftWeibo
//
//  Created by 刘英群 on 2017/2/17.
//  Copyright © 2017年 刘英群. All rights reserved.
//

import UIKit

//撰写微博类型视图
class LYQComposeTypeView: UIView {

    class func composeTypeView() -> LYQComposeTypeView {
        
        let nib = UINib(nibName: "LYQComposeTypeView", bundle: nil)
        
        let v = nib.instantiate(withOwner: nil, options: nil)[0] as! LYQComposeTypeView
        
        //xib加载默认 600 * 600
        v.frame = UIScreen.main.bounds
        return v
    }
    
    //显示当前视图
    func show() {
        
        //1.将当前视图添加到 
        guard let vc = UIApplication.shared.keyWindow?.rootViewController else {
            return
        }
        
        //2.添加视图
        vc.view.addSubview(self)
    }

}
